#ifndef __IC_H
#define __IC_H
#include "sys.h"

typedef struct {
    uint8_t IC_SUCCESS_FLAG;
    uint8_t IC_FALLING_FLAG;
    uint8_t IC_RISING_FLAG;
} IC_FLAGS;

typedef struct {
    uint32_t TIMx_TIMEOUT_COUNTER;
    uint32_t IC_FALLINF_COUNTER;
    uint32_t IC_RISING_COUNTER;
} IC_COUNTERS;


void ic_init(uint16_t arr, uint16_t psc);
uint32_t ic_time_get(void);

#endif
